var helper = {
  arrayExtFuntions: function() {
    //array 的 contains
    Array.prototype.contains = function(obj) {
      var i = this.length;
      while (i--) {
        if (this[i] === obj) {
          return true;
        }
      }
      return false;
    }
    // 查询元素在数组中的索引值
    Array.prototype.indexValue = function(arr) {
      for (var i = 0; i < this.length; i++) {
        if (this[i] == arr) {
          return i;
        }
      }
      return -1;
    }
  },

  init: function() {
    this.arrayExtFuntions();
  }
};


export default helper;